package sound;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.net.URISyntaxException;

import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.AudioDevice;
import javazoom.jl.player.Player;
import javazoom.jl.player.advanced.AdvancedPlayer;
import javazoom.jl.player.advanced.PlaybackListener;

public class LoadSound {

	public LoadSound() throws JavaLayerException, FileNotFoundException,
			URISyntaxException {
		for (int i = 0; i < 5; i++) {
			FileInputStream f = new FileInputStream(new File(getClass()
					.getResource("sound/bubbles_rising_to_water_surface.mp3")
					.toURI()));
			Player p = new Player(f);
			p.play();
		}

	}

	public static void main(String[] args) {
		try {
			ILoadMusic il = new LoadMusic(Sounds.THROW_HOOK, false);

			il.playMusic();
			
			il.playMusic();

		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
